package graphics;

public class Rectangle extends Graphics
{
	public Rectangle()
	{
		
	}
	float Long;
	float wide;
	public  Rectangle(float Long)
	{
		this.Long = Long;
	}
	public Rectangle(float Long,float wide) 
	{
		this(Long);
		super.name = "长方形";
		this.wide = wide;
	}
	public void area()
	{
		float area ;
		area = Long * wide;
		System.out.println(name+"的面积是："+area);
	}
	public void perimeter() 
	{
		float perimeter;
		perimeter = (Long + wide)*2;
		System.out.println(name+"的周长是："+perimeter);
	}
}
